<!--b noi dung-->
<div class="noidung_d fl" style="width: 100%">
    <div class="breadcrumbs">
        <ul>
            <li class="home"><a href="./trang-chu.html">Trang chủ</a><span>&gt;</span></li>
            <li class="product">
                <strong>Giỏ hàng</strong>
            </li>
        </ul>
    </div>
    <div id="orders_page">
        <?php
        if (!empty($info['ma']))
        {
        ?>
        <form id="checkoutFrm" action="<?php echo current_url() ?>" method="post">
            <div class="orders_col info">
                <h1><div class="icon">1.</div><div class="text"><?php echo $GLOBALS['lng']['customer_information'] ?></div></h1>
                <div class="clr_fix"></div>
                <div>
                    <div class="frm_item">
                        <div class="input-div">
                            <strong><?php echo $info['ten_nguoimua'] ?></strong>
                        </div>
                    </div>
                    <div class="frm_item">
                        <div>
                            <p>Email: <?php echo $info['email_nguoimua'] ?></p>
                        </div>
                        <div class="separator"></div>
                    </div>
                    <div class="frm_item">
                        <div>
                            <p><?php echo $GLOBALS['lng']['phone'] ?>: <?php echo $info['dienthoai_nguoimua'] ?></p>
                        </div>
                        <div class="separator"></div>
                    </div>
                    <div class="frm_item">
                        <p><?php echo $GLOBALS['lng']['shipping_address'] ?>:</p>
                        <div class="input-div">
                            <div class="note">
                                <?php echo ($info['diachi_giaohang'] ? $info['diachi_giaohang'].',' : '') ?>
                                <?php echo ($info['address_ward'] ? get_data('regions', "id = '{$info['address_ward']}'", 'name_vn').',' : '') ?>
                                <?php echo get_data('regions', "id = '{$info['address_district']}'", 'name_vn') ?><br />
                                <?php echo get_data('regions', "id = '{$info['address_city']}'", 'name_vn') ?>
                            </div>
                        </div>
                    </div>
                    <div class="separator"></div>
                    <div class="frm_item">
                        <p><?php echo $GLOBALS['lng']['notes'] ?></p>
                        <div class="input-div"><div class="note"><?php echo nl2br($info['khachhang_ghichu']) ?></div></div>
                    </div>
                    <div class="clr_fix"></div>
                </div>
            </div>
            <div class="orders_col products">
                <h1><div class="icon">2.</div><div class="text"><?php echo $GLOBALS['lng']['order_information'] ?></div></h1>
                <div class="clr_fix"></div>
                <div>
                    <div class="orders_head">
                        <div class="item_name"><?php echo $GLOBALS['lng']['order_item'] ?></div>
                        <div class="item_qty"><p><?php echo $GLOBALS['lng']['qty'] ?></p></div>
                        <div class="item_price"><p><?php echo $GLOBALS['lng']['order_price'] ?></p></div>
                        <div class="separator"></div>
                    </div>
                <?php
                $total = 0;
                if (count($carts) && is_array($carts))
                {
                    foreach ($carts as $data)
                    {
                    ?>
                    <div class="orders_item">
                        <div class="item_name">
                            <div><a href="./<?php echo $data['catkey'] ?>/<?php echo $data['keyword'] ?>-<?php echo $data['proid'] ?>.html"><img src="<?php echo PRO.'thumbs/'.$data['img'] ?>" alt="<?php echo $data['name'] ?>" /></a></div>
                            <h2 style="font-weight: normal;">
                                <a href="./<?php echo $data['catkey'] ?>/<?php echo $data['keyword'] ?>-<?php echo $data['proid'] ?>.html"><?php echo $data['name'] ?></a>
                            <?php
                            $pricelist = trim($data['pricelist']);
                            $pricelists = explode("\n", $pricelist);
                            if($pricelist && count($pricelists) > 1)
                            {
                            ?>
                            </h2>
                            <table width="145">
                                <tr>
                                    <th class="pricelist_head" style="padding: 1px;"><?php echo $GLOBALS['lng']['qty'] ?></th>
                                    <th class="pricelist_head" style="padding: 1px;"><?php echo $GLOBALS['lng']['price'] ?></th>
                                </tr>
                                <?php
                                for($n=0; $n < count($pricelists); $n++)
                                {
                                    $pricelist = explode(':', $pricelists[$n]);
                                    $ranges = explode('-', $pricelist[0]);
                                    if($data['soluong'] >= trim($ranges[0]) && (!empty($ranges[1]) && $data['soluong'] <= trim($ranges[1])))
                                    {
                                        $selected = ' selected';
                                    }
                                    else
                                    {
                                        $selected = '';
                                    }
                                    echo '<tr>
                                        <td class="pricelist_td'.$selected.'" style="padding: 1px;">'.$pricelist[0].'</td>
                                        <td class="pricelist_td'.$selected.'" style="padding: 1px;">'.number_format($pricelist[1] * 1000).'đ</td>
                                    </tr>';
                                }
                            ?>
                            </table>
                            <?php
                            }
                            else
                            {
                                echo '<p style="clear: both">'.$GLOBALS['lng']['price'].': '.number_format($data['gia']).'đ</p></h2>';
                            }
                            ?>
                        </div>
                        <div class="item_qty">
                            <p><?php echo $data['soluong'] ?></p>
                        </div>
                        <div class="item_price"><p><?php echo number_format($data['tongcong']) ?>đ</p></div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    }
                }
                ?>
                    <div class="orders_footer">
                        <div class="col1" style="text-transform: uppercase;"><?php echo $GLOBALS['lng']['orders_total'] ?></div>
                        <div class="col2"><p>&nbsp;</p></div>
                        <div class="col3"><p class="tongcong"><?php echo number_format($info['tongcong']) ?>đ</p></div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    if($info['vat']) {
                    ?>
                    <div class="orders_footer">
                        <div class="col1">VAT</div>
                        <div class="col2"><p>&nbsp;</p></div>
                        <div class="col3"><span class="vat"><?php echo number_format($info['vat']) ?></span>đ</div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    }
                    if($info['phi_giaohang']) {
                    ?>
                    <div class="orders_footer">
                        <div class="col1" style="text-transform: uppercase;"><?php echo $GLOBALS['lng']['shipping'] ?></div>
                        <div class="col2"><p>&nbsp;</p></div>
                        <div class="col3"><span class="phi_giaohang"><?php echo number_format($info['phi_giaohang']) ?></span>đ</div>
                        <div class="separator"></div>
                    </div>
                    <?php
                    }
                    ?>
                    <div class="orders_footer" style="padding-bottom: 20px;">
                        <div class="col1b" style="text-transform: uppercase;"><?php echo $GLOBALS['lng']['payment'] ?></div>
                        <div class="col2b"><span class="tien_thanhtoan"><?php echo number_format($info['tien_thanhtoan']) ?></span>đ</div>
                        <div class="separator"></div>
                    </div>
                </div>
            </div>
            <div class="orders_col method" style="padding-bottom: 32px">
                <h1><div class="icon">3.</div><div class="text"><?php echo $GLOBALS['lng']['payment_method'] ?></div></h1>
                <div class="clr_fix"></div>
                <div>
                    <div style="text-align: center; padding-top: 10px;"><?php echo $GLOBALS['lng']['order_code'] ?><br /><h1 class="orders_code"><?php echo $info['ma'] ?></h1></div>
                    <div class="frm_item" style="display: none">
                        <ul class="css3-radios">
                            <li><label><input disabled="disabled" type="radio" id="phuongthuc_thanhtoan0" name="phuongthuc_thanhtoan" value="0"<?php echo ($info['phuongthuc_thanhtoan'] == 0 ? ' checked="checked"' : '') ?> /><span style="opacity: 1"><?php echo $GLOBALS['lng']['payment_method_0'] ?></span></label></li>
                            <li><label><input disabled="disabled" type="radio" id="phuongthuc_thanhtoan1" name="phuongthuc_thanhtoan" value="1"<?php echo ($info['phuongthuc_thanhtoan'] == 1 ? ' checked="checked"' : '') ?> /><span style="opacity: 1"><?php echo $GLOBALS['lng']['payment_method_1'] ?></span></label></li>
                            <?php
                            if ($GLOBALS['cfg']['paypal_checkout'])
                            {
                            ?>
                            <li><label><input disabled="disabled" type="radio" id="phuongthuc_thanhtoan2" name="phuongthuc_thanhtoan" value="2"<?php echo ($info['phuongthuc_thanhtoan'] == 2 ? ' checked="checked"' : '') ?> /><span><img src="images/cardtype_paypal.gif" style="margin-top: -19px; float: right;" /></span></label></li>
                            <?php
                            }
                            if ($GLOBALS['cfg']['nganluong_checkout'])
                            {
                            ?>
                            <li><label><input disabled="disabled" type="radio" id="phuongthuc_thanhtoan3" name="phuongthuc_thanhtoan" value="3"<?php echo ($info['phuongthuc_thanhtoan'] == 3 ? ' checked="checked"' : '') ?> /><span><img src="images/nganluong_button.gif" style="margin-top: -17px; float: right;" /></span></label></li>
                            <?php
                            }
                            if ($GLOBALS['cfg']['baokim_checkout'])
                            {
                            ?>
                            <li><label><input disabled="disabled" type="radio" id="phuongthuc_thanhtoan4" name="phuongthuc_thanhtoan" value="4"<?php echo ($info['phuongthuc_thanhtoan'] == 4 ? ' checked="checked"' : '') ?> /><span><img src="images/baokim_button.gif" style="margin-top: -15px; float: right;" /></span></label></li>
                            <?php
                            }
                            if ($GLOBALS['cfg']['sohapay_checkout'])
                            {
                            ?>
                            <li><label><input disabled="disabled" type="radio" id="phuongthuc_thanhtoan5" name="phuongthuc_thanhtoan" value="4"<?php echo ($info['phuongthuc_thanhtoan'] == 5 ? ' checked="checked"' : '') ?> /><span><img src="images/sohapay_button.gif" style="margin-top: -15px; float: right;" /></span></label></li>
                            <?php
                            }
                            ?>
                        </ul>
                    </div>
                    <div class="order_status"><?php echo $GLOBALS['lng']['order_status'] ?><br /><h1 class="order_status" <?php echo ($info['status'] > 1 ? ' style="color: green;"' : '') ?>><?php echo $GLOBALS['orders_status'][$info['status']] ?></h1></div>
                    <?php
                    if ($info['status'] == 0)
                    {
                        ?>
                        <div class="frm_item order_confirm" style="text-align: center;">
                            <?php echo $GLOBALS['lng']['verification_code'] ?>:
                            <input type="text" name="maxacthuc" id="maxacthuc" autocomplete="off" value="<?php echo $this->input->get('code', true) ?>" style="width: 100px; text-align: center; font-size: 22px; text-transform: uppercase" maxlength="6" /><br /><br />
                            <div class="errordiv maxacthuc" style="top: 75px; left: 85px"><div class="arrow"></div><?php echo $GLOBALS['lng']['confirm_order_err1'] ?></div>
                            <div class="errordiv maxacthuc_fail" style="top: 75px; left: 85px"><div class="arrow"></div><?php echo $GLOBALS['lng']['confirm_order_err2'] ?></div>
                            <button type="submit" class="btn" id="order_confirm"><i class="fa-icon-ok"></i> <span><?php echo $GLOBALS['lng']['confirm_order'] ?></span></button>
                            <span style="display: none;" id="lng_confirm_order"><?php echo $GLOBALS['lng']['confirm_order'] ?></span>
                        </div>
                        <div class="clr_fix"></div>
                    <?php
                    }
                    ?>
                </div>
            </div>
            <div class="clr_fix"></div>
        </form>
        <?php
        }
        else
        {
        ?>
        <div style="height: 200px;"><?php echo $GLOBALS['lng']['not_found_order_code'] ?></div>
        <?php
        }
        ?>
    </div>
</div>
<!--e noi dung-->